package com.sky.mapper;

import com.sky.dto.EmployeeLoginDTO;
import com.sky.entity.Employee;
import com.sky.entity.User;
import com.sky.vo.EmployeeLoginVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EmployeeMapper {

    @Select("select * from employee where username = #{username}")
    Employee getByUsernameAndPassword(String username);

    @Insert("insert into employee (username, password, name, sex, phone, id_number, create_time, update_time, create_user, update_user) " +
            "values (#{username}, #{password}, #{name}, #{sex}, #{phone}, #{idNumber}, #{createTime}, #{updateTime}, #{createUser}, #{updateUser})")
    void insert(EmployeeLoginDTO employeeLoginDTO);
}
